<!DOCTYPE html>
<html>

<head>
    <title>我的资料</title>
    <meta charset="utf-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <link rel="stylesheet" href="/js/bootstrap-4.1.1-dist/css/bootstrap.min.css">
    <script src="/js/jquery/jquery.min.js"></script>
    <link rel="stylesheet" href="/css/font/css/font-awesome.min.css"/>
    <link rel="stylesheet" href="/css/reset.css"/>
    <link rel="stylesheet" href="/css/myProfiles.css"/>
    <script src="/js/plugins/jrender/jrender.min.js"></script>
    <script src="/js/checkLogin.js"></script>
    <script src="/js/common.js"></script>

    <script>
        $(function () {
            var user = JSON.parse(sessionStorage.getItem("user"));//得到的是登录的用户的信息
            //设置我的收藏页面
            $('#myFavorite').attr('href','/mine/myFavorite.html?id='+user.id)
            //更新当前用户个人信息
            $.get(baseUrl+'/users/'+user.id,function (data) {
                $(".info").renderValues(data.data,{
                    getHref: getHref
                });
                }
            )

            //签到点击跳转
            $(".btn-signin").click(function () {
                window.location.href="/mine/signin.html"
            });
            //积分商城跳转
            $(".btn-commodity").click(function () {
                window.location.href="/mine/commodity.html"
            });
            //查找当前用户拥有的积分
            $.get(baseUrl+"/users/"+user.id+"/mark",function (data) {
                console.log(data);
                $(".commodityScore").renderValues(data)
            })
        });
    </script>
</head>

<body>
<div class="nav-search">
    <a href="/index.html">
        <span><i class="fa fa-angle-left fa-2x"></i></span>
    </a>
</div>
<hr/>
<div class="container">
    <div class="row info">
        <div class="col-2" style="margin-right: 25px;">
            <img class="rounded-circle" render-src="headImgUrl">
        </div>
        <div class="col-8">
            <h5 render-html="nickName"></h5>
            <ul class="list-inline">
                <li class="list-inline-item">
                    <small>常住地</small>
                </li>
                <li class="list-inline-item" render-html="place">
                    <small></small>
                </li>
                <li class="list-inline-item">
                    <a style="color: #00bbd3" render-key="id" render-fun="getHref" data-url="/focusList.html?id=">关注<span render-html="followCount">0</span></a>
                </li>
                <li class="list-inline-item">
                    <a style="color: deeppink" render-key="id" render-fun="getHref" data-url="/fansList.html?id=">粉丝<span render-html="fansCount">0</span></a>
                </li>
            </ul>
        </div>
    </div>

    <div class="d-flex setting">
        <div class="p-2 flex-fill">
            <a href="editTravels.html">
                <button class="btn">
                    <i class="fa fa-camera fa-fw"></i>
                    记录我的旅游日记
                </button>
            </a>
        </div>
        <div class="p-2 flex-fill">
            <a href="info.html">
                <button class="btn">编辑个人资料</button>
            </a></div>
    </div>

</div>

<hr/>

<div class="row link-box">
    <div class="col commodityScore">
        <ul class="list-inline btn-commodity">
            <li class="list-inline-item"><i class="fa fa-shopping-bag fa-2x"></i></li>
            <li class="list-inline-item">
                <h7>积分商城</h7>
                <small>我的积分 <span render-html="mark"></span></small>
                <small>积分等级 <span render-html="levelName"></span></small>
            </li>
        </ul>

    </div>
    <div class="col">
        <ul class="list-inline btn-signin">
            <li class="list-inline-item"><i class="fa fa-calendar-check-o fa-2x"></i></li>
            <li class="list-inline-item">
                <h7>每日签到</h7>
                <small>别忘了签到哦</small>
            </li>
        </ul>
    </div>
</div>
<hr/>
<ul class="mainmenu">
    <li><a id="myFavorite" href="#"><b><i class="fa fa-star fa-2x"></i></b><span>我的收藏</span></a></li>
    <li><a href="/mine/mycomment.html"><b><i class="fa fa-commenting-o fa-2x"></i></b><span>我的评论</span></a></li>
    <li><a href="/mine/travels.html"><b><i class="fa fa-book fa-2x"></i></b><span>我的游记</span></a></li>
    <li><a href="#"><b><i class="fa fa-list-ul fa-2x"></i></b><span>我的心愿单</span></a></li>
    <li><a href="/mine/message.html"><b><i class="fa fa-bullhorn fa-2x"></i></b><span>我的消息</span></a></li>
    <li><a href="#"><b><i class="fa fa-file-text fa-2x"></i></b><span>我的物品</span></a></li>
    <li><a href="/mine/money.html"><b><i class="fa fa-briefcase fa-2x"></i></b><span>我的钱包</span></a></li>
    <li><a href="/mine/together.html"><b><i class="fa fa-sign-language fa-2x" style="color: coral" ></i></b><span style="color: #9F9F9F">我的结伴</span></a></li>
</ul>
</body>
</html>